package com.hits.zzbzstart.controller;

import com.hits.zzbzstart.entity.TGzSx;
import com.hits.zzbzstart.entity.TGzSxCl;
import com.hits.zzbzstart.service.SxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author wangshen
 * @ClassName 事项材料查询
 * @Description TODO
 * @date 2020/12/22
 */
@RestController
@RequestMapping("sxInfo")
@CrossOrigin
public class Sxcontroller {

    @Autowired
    private SxService sxService;

    @GetMapping("list")
    public List<TGzSx> list() {
        return this.sxService.sxList();
    }

    @GetMapping("sxclList/{sxid}")
    public List<TGzSxCl> getListBySxid(@PathVariable("sxid") String sxid) {
        return this.sxService.getSxclById(sxid);
    }


}
